﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BusinessLayer.RegInfo.Entities;
using Resources;

namespace FindArtInfo.Models
{
    [MetadataType(typeof(PageRegisterModel))]
    public class PageRegisterModel
    {
        public string MessageResultRegister { get; set; }

        [Required(ErrorMessage = "*")]
        public string FirstName { get; set; }

        [Required(ErrorMessage = "*")]
        public string LastName { get; set; }

        [Required(ErrorMessage = "*")]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessageResourceName = "EmailWrongFormat", ErrorMessageResourceType = typeof(Multi))]        
        public string Email { get; set; }

        [Required(ErrorMessage = "*")]
        [RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessageResourceName = "EmailWrongFormat", ErrorMessageResourceType = typeof(Multi))]
        [Compare("Email", ErrorMessage = "*")]
        public string ConfirmEmail { get; set; }

        [Required(ErrorMessage = "*")]        
        [DataType(DataType.Password)] 
        public string CreatePassWord { get; set; }

        [Required(ErrorMessage = "*")]
        public int CountryId { get; set; }
        public List<BusinessLayer.RegInfo.Entities.Country> ListCountry { get; set; }
        
        public string Find { get; set; }

        public int SubscriptionId { get; set; }
        public List<Subscription> ListSubscriptions { get; set; }

        public int TypePay { get; set; }

        public string CouponCode { get; set; }

        public bool Tern { get; set; }
    }
}